import React, { Component } from 'react';
import {
	StyleSheet,
	Text,
	View,
	Button,
	TextInput ,
	AsyncStorage
} from 'react-native';

export default class Login extends Component{
	_AsyncStorage=()=>{
		AsyncStorage.getItem("username").then(json => {
		    try {
		      		const username = JSON.parse(json);
					console.log(username)
		    } catch (e) {
	
	    	}
		    
	  	});
	}
	render(){
		return (
			<View>
				<Text>登录</Text>
				<Button
					title="AsyncStorage"
					color='red'
					onPress={this._AsyncStorage}
				/>
			</View>
		)
	}
}
